package com.example.entry;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 订单表
 */
@TableName(value ="order_form")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderForm implements Serializable {
    @TableId(value="id", type= IdType.AUTO)
    private Integer id;

    private Integer userId;

    private String orderNumber;

    private String nickName;

    private String userPhone;

    private String userAddress;

    private Integer productId;

    private String productName;

    private Integer productNumber;

    private Double productMoney;

    private String productImg;

    private String productAddress;

    private Integer riderId;

    private String riderName;

    private String riderPhone;

    private Integer status;

    @TableField(fill = FieldFill.INSERT)  // 新增数据时自动新增当前时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

//    @TableField(fill = FieldFill.UPDATE)  // 新增数据时自动新增当前时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private Integer isEvaluate;

    private Integer isMsg;

    private static final long serialVersionUID = 1L;
}